<template>
  <div>
    <div class="cards cards-borderless maAndW" >
      <div class="col-md-4 col-sm-6 col-lg-3"  v-for="(video,index) in videos" :key="index">
          <router-link class="card" :to="{name:'VideoDatail',params:{id:video.vid}}">
          <img :src='video.vimg' width="400px" height="200px">
          <div class="caption">已经有{{video.vtp}}位小伙伴为其点赞</div>
          <div class="card-heading"><strong>{{video.vname}}</strong></div>
          <div class="card-content text-muted">{{video.vintroduce}}</div>
          </router-link>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'videoDm',
    data() {
      return {
        videos:[]
      }
    },
    methods: {},
    components: {},
     mounted() {
      this.$axios.get('videoListbytype.do?tid=5').then(response => {
        this.videos = response.data
        console.log(this.videos);
      }).catch(function (error) {
        console.log(error);
      })

    }
  }
</script>

<style>

</style>